package com.li.general.buttons
{
import flash.events.MouseEvent;

public class TwoFrameButton extends Button implements ISelectableBtn
{
    private var _selected:Boolean;

    public function TwoFrameButton()
    {
        super();
    }

    public function set selected(value:Boolean):void
    {
        _selected = value;

        if(_selected)
            gotoAndStop(2);
        else
            gotoAndStop(1);
    }
    public function get selected():Boolean
    {
        return _selected;
    }

    override protected function hitMouseOverHandler(evt:MouseEvent):void
    {
        gotoAndStop(2);
    }

    override protected function hitMouseOutHandler(evt:MouseEvent):void
    {
        if(!_selected)
            gotoAndStop(1);
    }
}
}